import json

import requests

url = 'http://116.62.130.29/v1/workflows/run'

headers = {
    'Authorization': 'Bearer app-Fkr370nTyqFbXH3iAecejpZ7', # dify的api_key是工作流独立的，工作流id的信息藏在了api_key中
    'Content-Type': 'application/json'
}

payload = {
    "inputs": {"input": "hello"},
    "response_mode": "streaming",
    "user": "abc-123"
}

response = requests.post(url, headers=headers, json=payload)
print(response)
print(response.text)

